#!/bin/bash

# 统计代码行数
echo "统计courage75的代码行数"
git log --all --author="courage75" --no-merges --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, net lines: %s\n", add, subs, loc }'

# 统计提交次数
echo "统计courage75的提交次数："
git shortlog --all --numbered --summary --no-merges | grep "courage75"